using System;
using System.Collections.Generic;
using System.Text;
using System.Globalization;

namespace Musicman.Entities.BusinessEntities
{
    public class UserActivity
    {
        private long personID;
        private int numLogsWeb;
        private int numLogsClient;
        private long totalFiles;
        private long totalTraffic;
        private float mbLength = 0;

        private string firstName;
        private string lastName;

        private CultureInfo MyCi = new CultureInfo("en-US");

        public long PersonID
        {
            get { return personID; }
            set { personID = value; }
        }

        public int NumLogsWeb
        {
            get { return numLogsWeb; }
            set { numLogsWeb = value; }
        }

        public int NumLogsClient
        {
            get { return numLogsClient; }
            set { numLogsClient = value; }
        }

        public int TotalLogs
        {
            get { return numLogsWeb + numLogsClient; }
        }

        public long TotalFiles
        {
            get { return totalFiles; }
            set { totalFiles = value; }
        }


        public long TotalTraffic
        {
            get { return totalTraffic; }
            set 
            { 
                totalTraffic = value;
                mbLength = (float)this.totalTraffic / 1048576;
            }
        }

        public string TotalLengthMB
        {
            get
            {
                return String.Format("{0} MB", this.mbLength.ToString("0.00", MyCi.NumberFormat));
            }
        }

        public string FirstName
        {
            get { return firstName; }
            set { firstName = value; }
        }

        public string LastName
        {
            get { return lastName; }
            set { lastName = value; }
        }
    }
}
